package com.naiterui.ehp.bs.doctor.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;

/**
 * @author guoyongxiang
 * @date 2020/2/15 19:13
 * @since 1.0.0
 */
@Data
@Entity
@Table(name = "record_user_info")
public class RecordUserInfo implements Serializable {


    private static final long serialVersionUID = 2428737389099671658L;

    public static final Integer USER_TYPE_DR = 1;
    public static final Integer USER_TYPE_PH = 2;

    public static final Integer STATUS_UNAPPLY = 0;
    public static final Integer STATUS_APPLYING = 1;
    public static final Integer STATUS_PASS = 2;
    public static final Integer STATUS_FAILED = 3;
    public static final Integer STATUS_HANG = 4;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /** 用户ID */
    @Column(name = "user_id")
    private Long userId;

    /** 用户类别(1:医生,2:药师) */
    @Column(name = "user_type")
    private Integer userType;

    /** 用户编码 */
    @Column(name = "user_code", unique = true, nullable = false)
    private String userCode;

    /** 医院编码 */
    @Column(name = "hospital_code")
    private String hospitalCode;

    /** 医院名称 */
    @Column(name = "hospital_name")
    private String hospitalName;

    /** 家庭住址城市ID */
    @Column(name = "city_id")
    private Integer cityId;

    /** 家庭住址(精确到市) */
    @Column(name = "address")
    private String address;

    /** 家庭住址邮编 */
    @Column(name = "zip_code")
    private String zipCode;

    /** 民族编号 */
    @Column(name = "nation_code")
    private String nationCode;

    /** 民族 */
    @Column(name = "nation_name")
    private String nationName;

    /** 健康状况 */
    @Column(name = "health")
    private String health;

    /** 学历(1:专科、2:大学、3:硕士、4:博士) */
    @Column(name = "education")
    private Integer education;

    /** 业务水平考核机构或组织名称、考核培训时间及结果 */
    @Column(name = "appraisal")
    private String appraisal;

    /** 处罚或处分 */
    @Column(name = "punish")
    private String punish;

    /** 其他要说明的问题 */
    @Column(name = "other")
    private String other;

    /** 执业级别 */
    @Column(name = "prac_level")
    private String pracLevel;

    /** 执业类别 */
    @Column(name = "prac_type")
    private String pracType;

    /** 执业范围 */
    @Column(name = "prac_scope_approval")
    private String pracScopeApproval;

    /** 执业有效期开始日期 */
    @Column(name = "prac_start_date")
    private Date pracStartDate;

    /** 执业有效期结束日期 */
    @Column(name = "prac_end_date")
    private Date pracEndDate;

    /** 执业证取得日期 */
    @Column(name = "prac_issue")
    private Date pracIssue;

    /** 资格证取得日期 */
    @Column(name = "cert_issue")
    private Date certIssue;

    /** 申请时间 */
    @Column(name = "apply_date")
    private Date applyDate;

    /** 申请执业机构意见 */
    @Column(name = "audit_opinion")
    private String auditOpinion;

    /** 备案平台审核状态(0:未申请,1:待审核,2:审核通过,3:审核不通过) */
    @Column(name = "status")
    private Integer status;

    /** 创建时间 */
    @Column(name = "created_at")
    private Date createdAt;

    /** 创建人 */
    @Column(name = "created_by")
    private String createdBy;

    /** 修改时间 */
    @Column(name = "changed_at")
    private Date changedAt;

    /** 修改人 */
    @Column(name = "changed_by")
    private String changedBy;

    @Version
    private Integer version;
}
